<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>企业动态</title>
    <link rel="stylesheet" href="./css/reset.css">
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/jquery.page.css">
    <script src="./js/jquery.js"></script>
    <style>
        .first, .last{
            width:auto;
        }
    </style>
    <!--[if lt IE 9]>
        <script type="text/javascript"  src="http://www.ijquery.cn/js/html5shiv.js"></script>
    <![endif]-->
</head>

<body>
    <!-- header -->
    <div id="header" class="f-cb">
        <div class="logo fl">
            <a href="#">
                <img src="./image/logo.png" alt="" width="180">
            </a>
        </div>
        <ul class="main-menu fr">
            <li class="dropdown">
                <a href="./index.html">首页</a>
            </li>
            <li class="dropdown">
                <a href="#">
                    成功案例
                    <i class="iconfont">&#xe638;</i>
                </a>
                <ul class="subnav sub-directory">
                    <li>
                        <a href="./case.html?type=0">汉白玉石狮</a>
                    </li>
                    <li>
                        <a href="./case.html?type=1">汉白玉栏杆</a>
                    </li>
                    <li>
                        <a href="./case.html?type=2">汉白玉浮雕</a>
                    </li>
                    <li>
                        <a href="./case.html?type=3">人物雕塑</a>
                    </li>
                    <li>
                        <a href="./case.html?type=4">其他雕塑</a>
                    </li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#">
                    定制流程
                    <i class="iconfont">&#xe638;</i>
                </a>
                <ul class="subnav sub-directory">
                    <li>
                        <a href="./design.html">免费设计</a>
                    </li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#footer">
                    关于我们
                    <i class="iconfont">&#xe638;</i>
                </a>
                <ul class="subnav sub-directory">
                    <li>
                        <a href="./aboutUs_culture.html">企业文化</a>
                    </li>
                    <li>
                        <a href="./aboutUs_factory.html">厂区展示</a>
                    </li>
                </ul>
            </li>
            <li class="dropdown">
                <a href="#footer">联系我们</a>
            </li>
            <li class="dropdown active">
                <a href="./news.html">
                    近期跟踪
                    <i class="iconfont">&#xe638;</i>
                </a>
            </li>
        </ul>
    </div>
    <div class="placeholder"></div>
    <div class="news-container">
        <div class="banner" style="background-image:url(./image/news-banner.jpg)"></div>
        <div id="pageTarget">
            <div class="container_target" style="visibility: visible;">
                您的位置：
                <a href="./index.html">汉白玉雕塑</a>&gt;
                <a href="./news.html">企业动态</a> &gt;
            </div>
        </div>
        <div class="content-wrapper">
            <ul class="content-list f-cb">
                <li>
                    <a href="./newsDetail.html">
                        <div class="item-img">
                            <img src="./image/news-img.jpg" alt="">
                            <div class="item-mask"></div>
                        </div>
                        <div class="item-wrapper">
                            <p class="date-wrap">
                                <span class="year">2018</span>
                                <span class="md">09-13</span>
                            </p>
                            <div class="item-info">
                                <p class="title ellipsis">
                                    汉白玉雕刻的物品价位如何
                                </p>
                            </div>
                            <div class="item-des">
                                <p class="description">
                                    汉白玉雕刻 的物品古今中外有很多，从清朝的乾隆皇帝开始，汉白玉雕刻的艺术品是
                                </p>
                            </div>
                        </div>
                    </a>
                </li>
            </ul>
            <!-- <div class="news-list">
                <div class="news f-cb">
                   <a href="#">
                        <div class="title fl ellipsis">红颜无罪只是太美，离歌无言只是太悲</div>
                        <div class="time fr">2018-10-09</div>
                   </a>
                </div>
                <div class="news f-cb">
                    <a href="#">
                        <div class="title fl ellipsis">红颜无罪只是太美，离歌无言只是太悲</div>
                        <div class="time fr">2018-10-09</div>
                    </a>
                </div>
                <div class="news f-cb">
                    <a href="#">
                        <div class="title fl ellipsis">红颜无罪只是太美，离歌无言只是太悲</div>
                        <div class="time fr">2018-10-09</div>
                    </a>
                </div>
                <div class="news f-cb">
                    <a href="#">
                        <div class="title fl ellipsis">红颜无罪只是太美，离歌无言只是太悲</div>
                        <div class="time fr">2018-10-09</div>
                    </a>
                </div>
                <div class="news f-cb">
                    <a href="#">
                        <div class="title fl ellipsis">红颜无罪只是太美，离歌无言只是太悲</div>
                        <div class="time fr">2018-10-09</div>
                    </a>
                </div>
            </div> -->
        </div>
        <!-- 分页 -->
        <div id="page"></div>
    </div>
     <!-- footer -->
    <!-- footer -->
    <div id="footer">
        <!-- codemodel-->
       <div class="codeModel">
           <div class="code">
               <img src="./image/code.png" alt="">
           </div>
       </div>
       <div class="footer-con w1300 f-cb">
           <ul class="fl">
               <h3>联系我们</h3>
               <li class="address">
                   地址：<span></span>
               </li>
               <li class="phone">
                   电话：<span></span>
               </li>
               <li>
                   E-mail: <span class="email"></span> QQ：<span class="qq"></span>
               </li>
               <li>
                   网址：http://www.bxxlsd.com
               </li>
           </ul>
           <ul class="contact fl">
               <h3>关注我们</h3>
               <ul class="icons f-cb">
                   <li>
                       <a href="//weibo.com/u/3541697272" target="_blank">
                           <i class="iconfont">&#xe67a;</i>
                       </a>
                   </li>
                   <li>
                       <a  class="openQQ">
                           <i class="iconfont">&#xe600;</i>
                       </a>
                   </li>
                   <li class="wexin">
                       <i class="iconfont">&#xe63f;</i>
                   </li>
               </ul>
           </ul>
           <ul class="fl">
               <h3>联系鑫利石雕</h3>
               <div id="map">

               </div>
           </ul>
       </div>
       <div class="copyRight">
           版权所有Copyright©四川宝兴鑫利石雕厂 蜀ICP备16008598号-1 友情链接: <a href="#">汉白玉雕刻（石林轩）</a>
       </div>
   </div>
    <!-- side -->
    <div class="side">
        <ul>
            <li>
                <a href="#" class="openQQ">
                    <div class="sidebox">
                        <img src="./image/side_icon01.png" alt="">
                        在线咨询
                    </div>
                </a>
            </li>
            <li>
                <a href="#" class="openQQ">
                    <div class="sidebox">
                        <img src="./image/side_icon02.png" alt="">
                        在线咨询
                    </div>
                </a>
            </li>
            <li class="phone">
                <a href="#">
                    <div class="sidebox">
                        <img src="./image/side_icon03.png" alt="">
                        <span></span>
                    </div>
                </a>
            </li>
        </ul>
    </div>
    <script src="./js/common.js"></script>
    <script src="./js/jquery.page.js"></script>
    <script src="http://api.map.baidu.com/api?v=2.0&ak=IDvNBsejl9oqMbPF316iKsXR&callback=map_init"></script>
    <script src="http://api.map.baidu.com/getscript?v=1.4&ak=&services=&t=20181212032854"></script>
    <script>
        var obj={
            url:'http://39.108.226.146',
            pageNum:1,
            pageSize:20,
            total:0,
            init(){
                this.getData();
            },
            getData(){
                var _this=this;
                $.ajax({
                    url:this.url+'/user/News',
                    type:'get',
                    data:{pageNum:this.pagenum,pageSize:this.pageSize},
                    success:function(res){
                        res=JSON.parse(res);
                        console.log(res);
                        if(res.status==0){
                            _this.joinHtml(res.data);
                            _this.total=parseInt(res.msg);
                            $("#page").show();
                            _this.page();
                        }
                    }
                })
            },
            joinHtml(data){
                var html="";
                for(var i=0;i<data.length;i++){
                    html+="<li>"
                    html+="<a href='./newsDetail.html?id="+data[i]._id+"'>"
                    html+=  "<div class='item-img'>"
                    //html+=     "<img class='lazy' src="+data[i].imgs[0].replace('../client','http://39.108.226.146/').replace('./','http://39.108.226.146/')+" >"
                    html+=     "<div class='item-mask'></div>"
                    html+=  "</div>"
                    html+=  "<div class='item-wrapper'>"
                    html+=     "<p class='date-wrap'><span class='year'>"+this.getYear(data[i].updateTime)+"</span><span class='md'>"+this.getMonth(data[i].updateTime)+"</span></p>"
                    html+=     "<div class='item-info'><p class='title ellipsis'>"+data[i].title+"</p></div>"
                    html+=     "<div class='item-des'><p class='description'>汉白玉雕刻 的物品古今中外有很多，从清朝的乾隆皇帝开始，汉白玉雕刻的艺术品是</div>"
                    html+=   "</div>"
                    html+="</a>"
                    html+="</li>"
                }
                $(".content-wrapper .content-list").append(html);
            },
            getYear(yearTime){
                var myDate = new Date(yearTime);
                return myDate.getFullYear();
            },
            getMonth(yearTime){
                var date = new Date(yearTime);
                var seperator1 = "-";
                var month = date.getMonth() + 1;
                var strDate = date.getDate(yearTime);
                if (month >= 1 && month <= 9) {
                    month = "0" + month;
                }
                if (strDate >= 0 && strDate <= 9) {
                    strDate = "0" + strDate;
                }
                var currentdate = month + seperator1 + strDate;
                return currentdate;
            },
            page(){
                var _this=this;
                $("#page").Page({
                    totalPages: _this.total/_this.pageSize,//分页总数
                    liNums: 4,//the li numbers(advice use odd)
                    activeClass: 'activP', //active 类样式定义
                    prv: '«',//prev button name
                    next: '»',//next button name 
                    callBack : function(page){
                            _this.pagenum=page;
                            _this.initData();
                    }
                })
            }
        }
        obj.init();
    </script>
    <script type="text/javascript">
		$(function(){
			$("#page").Page({
                totalPages: 9,//分页总数
                liNums: 7,//分页的数字按钮数(建议取奇数)
                activeClass: 'activP', //active 类样式定义
                callBack : function(page){
                        //console.log(page)
                }
             });
		})
	</script>
</body>